/*
 * @Author: Starfish_DL
 * @Date: 2020-10-16 16:07:34
 * @LastEditors: Starfish_DL
 * @LastEditTime: 2020-10-16 16:21:36
 * @CurrentVersion: 1.0
 * @Description: 
 */

public class SubClassB extends SubClassA {
    /**
     * @author: Starfish_DL
     * @description: 1.有抽象方法的类必须为抽象类；
     *               2.抽象类无法创建自己对象，只可以声明一个引用；
     *               3.ShowTip形参必须和虚拟类规定的一致；
     *               4.不可以将父类构造器赋给子类；
     * @param {type} 
     * @return {type} 
     */
    String c = "c";
    public static void main(String[] args) {
        // SuperClass a = new SuperClass();
        // System.out.println("This is " + a.nName);
        // a.ShowTip();
        SubClassB b = new SubClassB();
        b.ShowTip();
        System.out.println("This is " + b.nName + "  " + b.c);
    }
}

abstract class SuperClass {
    String nName = "SuperClass";
    abstract void ShowTip();
}

class SubClassA extends SuperClass {
    String nName = "SubClassA";
    String tip = "tip";
    void ShowTip() {
        System.out.println("This is " + nName);
    }
}
